# from torch import nn
# import re
# import os
#
#
# class Lr(nn.Module):
#     def __init__(self):
#         super(Lr, self).__init__()
#         # super().__init__()
#         # nn.Module.__init__()
#         self.linear = nn.Linear(1, 1)  # 实例化一个Linear类对象
#         pass
#
#     def forward(self, x):
#         out = self.linear(1)  # Module中有__call__方法，__call__方法中调用了forward方法，Lr重写了forward方法，所以Lr对象调用的是Lr中的forward方法，因为Linear继承自Module，并且Module的__call__方法中调用了forward方法，所以self.linear(1)是调用的Linear类中的forward方法
#         return out
#         pass
#
#
# model = Lr()
# predict = model(1)
#
# nn.MSELoss()
#
# # l = ['1 2 3']
# # print(re.sub(r"\s", '', str(l)))
# # print(os.listdir(r"F:\virtual_environment\data\aclImdb_v1\aclImdb\test"))
# import torch
#
# a = torch.randint(low=10, high=100, size=[3, 4])
# b = torch.randint(low=10, high=100, )
# print(a)
# print(a.max(dim=-1))
# print(a.max(dim=-1)[-1])

import torch

print(torch.cuda.is_available())  # True
